﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Text.RegularExpressions;

namespace NameGeneratorSanitizer
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            textBox2.Text = "";
            foreach (string str in Regex.Split(textBox1.Text,"\n")) 
            {
                if (textBox2.Text != "") textBox2.Text += ",";
                textBox2.Text += "\"" + str.Split(' ')[str.Split(' ').Length-1] + "\"";
            }
        }
    }
}
